DR2='N:'
F1='ACT_YTD'
F2='ACT_PROY'
F3='ACT_PHAY'
f5='REVENUEY'
SELE 1
SET EXCLU OFF
USE &dr2&f1
GO BOTT
MON=upper(CMONTH(DATE_VISIT))
YR=trans(year(date_visit),'####')
GO TOP
STOR 0 TO TTL,TPR,TPH,TGP,TDE,TXR,TUS,TLA,TSP,TSU,TCL,TCU,TER,TDR,TDI,TVA,TIN,THF,nvisit
STOR 0 TO PTL,PPR,PPH,PGP,PDE,PXR,PUS,PLA,PSP,PSU,PCL,PCU,PER,PDR,PDI,PVA,PIN
STOR 0 TO HTL,HPR,HPH,HGP,HDE,HXR,HUS,HLA,HSP,HSU,HCL,HCU,HER,HDR,HDI,HVA,HIN
STOR 0 TO MTL,MPR,MPH,MGP,MDE,MXR,MUS,MLA,MSP,MSU,MCL,MCU,MER,MDR,MDI,MVA,MIN
STOR 0 TO NTL,NPR,NPH,NGP,NDE,NXR,NUS,NLA,NSP,NSU,NCL,NCU,NER,NDR,NDI,NVA,NIN,NHF
STOR 0 TO TTR,TPA,THL,TMS,TFE,TCA,TCP,TCH,TCC,TCR,pl1,pl2,pl3,RECN1,RECN2,RECN3,TFC
STOR 0 TO PHF,HHF,MHF
SELE 2
SET EXCLU OFF
USE &dr2&f2 INDEX &dr2&f2
SET COLOR TO W+/B,W+/N
@ 12,42 CLEA TO 23,78
@ 12,55 say "Medical  :"
go top
do while .not. eof()
   do repac01
ENDDO
sele 3
SET EXCLU OFF
USE &dr2&f3 INDEX &dr2&f3
@ 14,55 say "Pharmacy :"
go top
do while .not. eof()
   do repac02
ENDDO
sele 5
set exclu off
use &dr2&f5
@ 16,55 say "Revenue :"
go top
do while .not. eof()
   do repac03
ENDDO
do while pl1=0
   @ 18,60 say '/'
   @ 18,54 prompt 'Print'
   @ 18,62 prompt 'Quit'
   menu to pl1
   if pl1=2
      RETN=.T.
      return
   else
      @ 20,60 say '/'
      @ 20,46 prompt 'Printer Ready'
      @ 20,62 prompt 'Not Yet Ready'
      menu to pl2
      if pl2=2
         @ 20,46 clea to 20,78
         pl1=0
      else
         @ 22,46 say '        Printing...    '
         set console off
         set devi to prin
      endif
   endif
enddo
SET DEVI TO PRIN
HL=1
@  0,  4 SAY "Issued on : "+DTOC(DATE())+space(40)+"Page : "+trans(hl,'##')
@  2, 15 SAY "A.E.A. CLINIC - SUMMARY REPORT FOR THE MONTH OF "+mon+" "+yr
DO REPAC1
HL=HL+1
@  0,  4 SAY "Issued on : "+DTOC(DATE())+space(40)+"Page : "+trans(hl,'##')
@  2, 15 SAY "A.E.A. CLINIC - SUMMARY REPORT FOR THE MONTH OF "+mon+" "+yr
DO REPAC2
@ 30,  4 SAY "Issued on : "+DTOC(DATE())+space(40)+"Page : "+trans(hl,'##')
@ 32, 15 SAY "A.E.A. CLINIC - SUMMARY REPORT FOR THE MONTH OF "+mon+" "+yr
DO REPAC3
EJECT
SET DEVI TO SCREEN
RETURN